aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/invoice/[id].svelte
diff options
context:
space:
mode:
authorsecondl1ght <[email protected]>2022-07-30 14:00:08 -0600
committersecondl1ght <[email protected]>2022-07-30 14:00:08 -0600
commit9291b50da24eec4bd9d96d05e2bb4ae40c61b3bb (patch)
tree7872c36fef5c6050c27b3441ec458e8b9aa65671 /src/routes/invoice/[id].svelte
parentf779cf9547d0e68fe83a7a5fe16e93ff58cc0c07 (diff)
downloadcoinos-ui-9291b50da24eec4bd9d96d05e2bb4ae40c61b3bb.tar.gz
coinos-ui-9291b50da24eec4bd9d96d05e2bb4ae40c61b3bb.zip
add 404 component, remove duplicate redirects, loading splash, fix lgout
Diffstat (limited to 'src/routes/invoice/[id].svelte')
-rw-r--r--src/routes/invoice/[id].svelte17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/routes/invoice/[id].svelte b/src/routes/invoice/[id].svelte
index a9f3cefb..2ed1ba67 100644
--- a/src/routes/invoice/[id].svelte
+++ b/src/routes/invoice/[id].svelte
@@ -7,10 +7,6 @@
export let amount, rate, text;
- if (!$user && typeof window !== 'undefined') {
- window.location = '/login';
- }
-
$: amountFiat = parseFloat(((amount * rate) / 100000000).toFixed(2));
let tipPercent = 0;
@@ -104,6 +100,9 @@
};
let customInput;
+
+ let qrSkeleton = true;
+ setTimeout(() => (qrSkeleton = false), 1000);
</script>
{#if $user}
@@ -225,8 +224,14 @@
id="qr"
class="border {showMobileTip
? 'border-gray-400'
- : 'border-lightgrey'} rounded-3xl block md:flex justify-center items-center"
- />
+ : 'border-lightgrey'} rounded-3xl block md:flex justify-center items-center h-[300px] w-[250px] md:w-[300px] relative"
+ >
+ <div
+ class="z-100 h-[300px] w-[250px] md:w-[300px] animate-pulse absolute top-0 left-0 bg-gray-400 rounded-3xl {qrSkeleton
+ ? 'block'
+ : 'hidden'}"
+ />
+ </div>
<div class="px-5 space-y-3">
<div class="flex justify-between">